#pragma once
#include <map>
using namespace std;
class ICell
{
public:
	ICell(int type);
	virtual ~ICell(void);
	inline int GetType() {return m_type;};
private:
	int m_type;
};


class CellFactory
{
public:
	static CellFactory* sharedCellFactory();
	void SetCellTypeRange(unsigned int lower, unsigned int upper);
	ICell* GetCell(unsigned int type);
private:
	CellFactory();
	virtual ICell* CreateCell(unsigned int type);
private:
	static CellFactory* s_sharedCellFactory;
	typedef map<unsigned int, ICell*> CellMap;	
	CellMap m_cells;
	unsigned int m_lowerBound;
	unsigned int m_upperBound;
};

